<?php 
include("conf/mysqlconn.php");

$dbconf = new MysqlConnector();
$con = $dbconf->connectMySql();
if (!$con) {
    die('连接数据库失败:' . mysql_error());
}

mysql_query("set names 'utf8'"); // 解决中文乱码问题
$goodsList = mysql_query("select * from Goods");
mysql_close($con);
?>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="css/global.css" rel="stylesheet" type="text/css" />
        <title></title>
    </head>
    <body>
        <?php include 'include/header.php'; ?>
        <div id="wrapper">
            <div id="shelf">  
                <div id="cat">
                    <ul>
                        <?php
                        while ($row = mysql_fetch_array($goodsList)) {
                            echo "<li>";
                            echo "<div class='catImg'><image src='".$row["ImagePath2"]."' border='0'></div>";
                            echo "<div>".$row["Name2"]."</div>";
                            echo "</li>";
                        }
                        ?>
                   </ul>
                </div>
            </div>
            <div id="products">
                <ul>
                    <li><div><img src="/VeDistribution/resource/images/eggplants_200.png" border="0"/></div></li>
                    <li><div><img src="/VeDistribution/resource/images/eggplants_200.png" border="0"/></div></li>
                    <li><div><img src="/VeDistribution/resource/images/eggplants_200.png" border="0"/></div></li>
                    <li><div><img src="/VeDistribution/resource/images/eggplants_200.png" border="0"/></div></li>
                </ul>
            </div>
        </div>
    </body>
</html>
